package 作业;

import java.util.Scanner;

public class StudentManage02 {
    Scanner scanner = new Scanner(System.in);
    StudentService studentService = new StudentService();


    public static void main(String[] args) {
        StudentManage02 studentManage02 = new StudentManage02();
        studentManage02.init();

    }

    private void init(){
        while (true){
            System.out.println("选择(1、录入;)");
            System.out.println("(0、退出;)");
            int choice = scanner.nextInt();
            if (choice == 1){
                studentService.add();
            } else if (choice == 0) {
                studentService.printStudent();
                scanner.close();
                break;
            }
        }
    }
}
